const { Blog, User } = require("./model.js");
!(async function() {
  // 删除一条博客
  //   const delBlogRes = await Blog.destroy({
  //     where: {
  //       id: 4
  //     }
  //   });
  //   console.log("delBlogRes", delBlogRes > 0);
  //   删除一个用户
  const delUserRes = await User.destroy({
    where: {
      id: 1
    }
  });
  console.log("delUserRes", delUserRes);
})();
//  Cannot delete or update a parent row: a foreign key constraint fails (`jojo_server`.`blogs`, CONSTRAINT `blogs_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE)
